package com.lm.logback.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/log")
public class LogController {
    private final Logger logger = LoggerFactory.getLogger(LogController.class);

    @RequestMapping("/info")
    @ResponseBody
    public Map<String, Object> showLog(){
        logger.info("info日志");
        Map<String, Object> map = new HashMap<>();
        map.put("msg", "info");
        return map;
    }
}
